In this Getting Started procedure, we will build and run a console application in C# or Visual Basic that shows how to create an OPC Data Access event source, and query it for events carrying even data value.
We assume that you have already installed a StreamInsight instance named “Instance1”, as described in the previous chapter. We also assume that you have Microsoft Visual Studio 2022 or later installed.
- From the Start menu (locate the QuickOPC product submenu) or the Launcher application, and select “Examples for .NET (Source Code) -> Examples with Microsoft StreamInsight”. This will open the solution in Visual Studio.
- In the Solution Explorer of Visual Studio, double-click “Program.cs” under “SimpleDAStreamInsightApplication” project. This will give you a chance to review the one-page program we are going to build and run.
- Right-click on “SimpleDAStreamInsightApplication” project in the Solution Explorer, and select “Debug -> Start new instance”. This will build and run the program.
- Observe the results in the console window, and after you receive enough events, press Enter to stop the server. The output should look similar to this:
You can also try similar projects for other OPC Specifications:
- SimpleAEStreamInsightApplication: For OPC Alarms&Events (OPC-A&E), or
- SimpleUAStreamInsightApplication: For OPC Unified Architecture (OPC-UA).
See Also